import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

import javax.sql.DataSource;

public class Test {
    public static void main(String[] args) {
        DataSource dataSource=new MysqlDataSource();
        ((MysqlDataSource)dataSource).setDatabaseName();
        ((MysqlDataSource)dataSource).setUrl("jdbc:mysql://127.0.0.1:3306/student?characterEncoding=utf8&&useSSL=false");

    }
}
